﻿<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css" /><meta name="generator" content="Aspose.Words for .NET 15.1.0.0" /><title></title></head><body><div><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:center; text-indent:0pt; widows:0"><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">第</span><span style="font-family:Consolas; font-size:22pt; font-weight:bold">13</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">章</span><span style="font:7.0pt 'Times New Roman'">&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0;&#xa0; </span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">推送系统的实现</span></h1><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">1</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">任务系统的简介</span></h1><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">从上游</span><span style="font-family:Consolas; font-size:10.5pt">(Match-engine\Exchange-engin)</span><span style="font-family:微软雅黑; font-size:10.5pt">会获取数据</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">对数据做一定的加工后</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">将该数据推送给下游服务里面</span><span style="font-family:Consolas; font-size:10.5pt">.</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.001.png" width="553" height="474" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">2</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">任务系统的启动</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">2.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">事件</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">事件是某种动作的载体</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">我们认为发送了某种事件后</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">肯定会触发该动作。</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">2.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">定时任务</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">使用定时任务触发事件</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">从而引发事件里面的处理器处理它</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">2.3 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">添加依赖</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;com.bjsxt&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;coin-common&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">version</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;1.0&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">version</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;joda-time&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;joda-time&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;com.bjsxt&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;exchange-api&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">version</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;1.0&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">version</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">2.4 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">添加配置文件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">spring</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">  </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">application</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">name</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: task-service</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">  </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">cloud</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:  </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic"># nacos</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic">地址</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">nacos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">server-addr</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: nacos-server:8848</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">config</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">file-extension</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: yaml</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">stream</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">bindings</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">subscribe_event_out</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: {</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">destination</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: tio_group, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">content-type</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: application/plain, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">group</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: order-group, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">consumer.maxAttempts</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: 1}</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">rocketmq</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">binder</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">          </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">name-server</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: rocket-server:9876</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">  </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">profiles</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">active</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">: dev</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic"># </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic">拉取的配置文件的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic">dataID =  task-service-dev.yaml</span></p><p style="font-size:9pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:9pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">2.5 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">添加启动类</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10.5pt">@SpringBootApplication</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10.5pt">@EnableScheduling</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10.5pt">@EnableDiscoveryClient</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10.5pt">TaskServiceApplication </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">public static void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10.5pt">main</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10.5pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">[] args) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10.5pt">SpringApplication</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt; font-style:italic">run</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10.5pt">TaskServiceApplication</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">.</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">class</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">,args) ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">}</span></p><p style="font-size:9pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:9pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">3</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">事件定义</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">3.1 定义事件的接口</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">事件的接口</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public interface </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">事件触发处理机制</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">3.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">盘口深度事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">深度盘口数据事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">推送市场合并深度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">3.3 K</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线推送事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic"> * K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">线推送事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:7.5pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:7.5pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">KlineEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">Runnable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">交易对标识符</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:7.5pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:7.5pt">channel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">     * redis key </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">前缀</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:7.5pt">keyPrefix</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:7.5pt">KlineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:7.5pt">KlineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">symbol, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">channel, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:7.5pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">keyPrefix) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:7.5pt">symbol </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">= symbol;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:7.5pt">channel </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">= channel;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:7.5pt">keyPrefix </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">= keyPrefix;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">事件触发处理机制</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:7.5pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:7.5pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">让线程池调度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:7.5pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:7.5pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:7.5pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:7.5pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:7.5pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:7.5pt">run</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">        handle();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:7.5pt">    }</span></p><p style="font-size:5.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:5.5pt; vertical-align:baseline">}</span></p></td></tr></table><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">3.4 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">实时成交订单事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">成交记录事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">3.5 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">币币交易数据事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">行情数据的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">K</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">TradeKLineEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">      }</span></p><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">}</span></p><p style="font-size:6.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:6.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">3.6 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">行情市场的事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">行情市场的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span></p><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt"> </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">      }</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">}</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">4</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">事件触发</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">4.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">关于行情事件的触发</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">行情的任务触发</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Component</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MarketTickerTask </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MarketEvent </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">marketEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">TradeEvent </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">tradeEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">DepthEvent </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">depthEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">推送交易对信息</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Scheduled</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(fixedRate = </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">1000</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">pushMarkets</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">marketEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.handle();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">推送市场深度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Scheduled</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(fixedRate = </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">500</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">pushDepths</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">depthEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.handle();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">推送实时成交订单数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Scheduled</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(fixedRate = </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">500</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">pushTrades</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">tradeEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.handle();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    }</span></p><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt"> }</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">4.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">关于</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">K</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线事件的触发</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线数据的推送</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TopicKLineTask</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">ExecutorService </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">executor </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">null</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">executor </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">ThreadPoolExecutor(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">5</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">,</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">10</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">,</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">100L</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TimeUnit</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">MILLISECONDS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">,</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">LinkedBlockingQueue&lt;&gt;(</span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">30</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">ThreadPoolExecutor</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.CallerRunsPolicy());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">每</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">3</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">秒推送</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">K</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Scheduled</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(fixedRate = </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">3000</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">pushKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String channel </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"market.%s.kline.%s"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt"> </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">      </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt"> </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">executor</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.submit(</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">KlineEvent()</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">4.3 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">关于交易事件的触发</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeKLineTask </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeKLineEvent </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">tradeKLineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">币币交易生成一次</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">K</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Scheduled</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(fixedRate = </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">25000</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">generateKLine</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">tradeKLineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.handle();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">5</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">整合</span><span style="font-family:Consolas; font-size:22pt; font-weight:bold">MQ </span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">向下游发送数据</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">5.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">添加依赖</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;com.alibaba.cloud&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">groupId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    &lt;</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;spring-cloud-stream-binder-rocketmq&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">artifactId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;/</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">dependency</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">5.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">添加</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">Source</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public interface </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Source </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">向指定的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">output </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">里面输出信息</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Output</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"subscribe_event_out"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageChannel </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">subscribeEventOutput</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">5.3 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">开启</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">Stream</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">开启</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">Stream</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Configuration</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@EnableBinding</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(value = </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">class</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">RocketMqConfig </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">5.3 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">添加配置文件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">spring</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">  </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">application</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">name</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: task-service</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">  </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">cloud</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:  </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"># nacos</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">地址</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">nacos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">server-addr</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: nacos-server:8848</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">config</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">file-extension</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: yaml</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">stream</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">bindings</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">subscribe_event_out</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: {</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">destination</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: tio_group, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">content-type</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: application/plain, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">group</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: order-group, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">consumer.maxAttempts</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: 1}</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">      </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">rocketmq</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">binder</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">          </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">name-server</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: rocket-server:9876</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">  </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">profiles</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">:</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">active</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: dev</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"># </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">拉取的配置文件的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">dataID =  task-service-dev.yaml</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">5.4 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">添加常用的工具类</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">/</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">枚举类</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.002.png" width="285" height="183" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">CreateKLineDto </span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">: common</span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">里面</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Data</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@EqualsAndHashCode</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CreateKLineDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易对名称</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易的价格</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">price</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易的数量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">volume</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">MergeDepthDTO </span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">:</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Data</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@NoArgsConstructor</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Accessors</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(chain = </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">true</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MergeDepthDTO </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">合并类型</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">mergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">合并精度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">value</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">DepthMergeType </span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">:</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public enum  </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthMergeType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">DEFAULT</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"step0"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">LOW</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"step1"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">HIGH</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"step2"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">2</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">代码</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">code</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">值</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private int </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">value</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">getCode</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">code</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">setCode</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">code) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">code </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= code;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public int </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">getValue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">value</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">setValue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">int </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">value) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">value </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= value;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">DepthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">code, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">int </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">value) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">code </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= code;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">value </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= value;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public static </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthMergeType </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">getByCode</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">code) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">StringUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(code)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return null</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthMergeType depthMergeType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">values</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">depthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getCode().equals(code)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">depthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return null</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public static </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthMergeType </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">getByValue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">int </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">value) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthMergeType depthMergeType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">values</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">depthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getValue() == value) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">depthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return null</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">KlineType</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">:</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * K</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线类型</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public enum </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">KlineType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">ONE_MINUTES</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"1min"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">FIVE_MINUTES</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"5min"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">FIFTEEN_MINUTES</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"15min"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">THIRTY_MINUTES</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"30min"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">ONE_HOUR</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"1hour"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">TWO_HOURS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"2hour"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">FOUR_HOURS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"4hour"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">SIX_HOURS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"6hour"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">TWELVE_HOURS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"12hour"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">ONE_DAY</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"1day"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">ONE_WEEK</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"1week"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">ONE_MONTH</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"1mon"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">ONE_YEAR</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"1year"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">value</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">KlineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">value) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">value </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= value;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">getValue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(){</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">value</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public static </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">KlineType </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">getByValue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">value) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">KlineType klineType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">KlineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">values</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getValue().equals(value)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return null</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">MessageChannel </span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">:</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">订阅的频道名称</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public enum </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessageChannel </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ORDER_TX</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"order.tx"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ORDER_CANCEL</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"order.cancel"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ORDER_IN</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"order.in"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">MATCH_IN</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"match.in"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ORDER_DELAY_NOTIFY</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"order.delay.notify"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">SYNC_ACCOUNT</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"sync.account"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">MARKET_REFRESH</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"market.refresh"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">BONUS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"bonus"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">REGISTER_REWARD</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"register.reward"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">FINANCE_RECHARGE_SUCCESS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"finance.recharge.success"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">FINANCE_WITHDRAW_RESULT</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"finance.withdraw.result"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">),</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">RECHARGE_ADDRESS</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"plant.user.address"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">channel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">MessageChannel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">channel) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">channel </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= channel;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">getChannel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">channel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">setChannel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">channel) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">channel </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= channel;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">常量</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">Constants :</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">常用的常量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public interface </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Constants </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">{</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * UTF-8 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">字符集</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">UTF8 </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"UTF-8"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * GBK </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">字符集</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">GBK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"GBK"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * http</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">请求</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">HTTP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"http://"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * https</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">请求</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">HTTPS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"https://"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">成功标记</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Integer </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">SUCCESS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">200</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">失败标记</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Integer </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">FAIL </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">500</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">验证码 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">redis key</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CAPTCHA_CODE_KEY </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"captcha_codes:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">验证码有效期（分钟）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final long </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CAPTCHA_EXPIRATION </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">2</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">数值类型精度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final  int </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">SCALE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">8</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final int </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">AGENT_TYPE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">2</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">BCRYPT_SALT </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"!waihui!_+waihui+-"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">首页</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">Banner</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">图</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WEB_BANNER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"WEB_BANNER"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">TOKEN </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"token"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/*********************************** MATCH ********************************/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">MATCH_RESULT_DEAL_ORDER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"dealOrder"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">MATCH_RESULT_BUY_ORDER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"buyOrder"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">MATCH_RESULT_SELL_ORDER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"sellOrder"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">MATCH_RESULT_NEW_BUY_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"buyLock"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">MATCH_RESULT_NEW_SELL_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"sellLock"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">MATCH_RESULT_PART_MATCH </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"partMatch"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/*********************************** MATCH ********************************/</span><br /><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    /*********************************** CONFIG TABLE CODE ********************************/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_TYPE_SYSTEM </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"SYSTEM"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_TYPE_CNY </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CNY"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_TYPE_SMS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"SMS"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_TYPE_REGISTER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"REGISTER_REWARD"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_TYPE_REWARD </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"INVITE_REWARD"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">最小提现额度（</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final  </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WITHDRAW_MIN_AMOUNT </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"WITHDRAW_MIN_AMOUNT"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">最大提现额度（</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WITHDRAW_MAX_AMOUNT </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"WITHDRAW_MAX_AMOUNT"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">最小取现手续费（</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WITHDRAW_MIN_POUNDAGE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"WITHDRAW_MIN_POUNDAGE"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">取现手续费率（</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WITHDRAW_POUNDAGE_RATE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"WITHDRAW_POUNDAGE_RATE"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">取现基数（</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">），取现值必须是基数的倍数，基数如果是</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">100</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">，那么取现值只能是</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">100</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">的倍数，例如：</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">200, 300</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">等</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WITHDRAW_BASEAMOUNT </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CONFIG_WITHDRAW_BASEAMOUNT"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">每日最大提现额（</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WITHDRAW_DAY_MAX_AMOUNT </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"WITHDRAW_DAY_MAX_AMOUNT"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">提现状态（</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_WITHDRAW_STATUS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"WITHDRAW_STATUS"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币币交易状态</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_TRADE_STATUS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"TRADE_STATUS"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">人民币充值</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">换算费率</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_CNY2USDT </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CNY2USDT"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">人民币提现</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">USDT</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">换算费率</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_USDT2CNY </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"USDT2CNY"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">提现审核级数</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_CASH_WITHDRAW_AUDIT_STEPS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CASH_WITHDRAW_AUDIT_STEPS"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">充值审核级数</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_CASH_RECHARGE_AUDIT_STEPS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CASH_RECHARGE_AUDIT_STEPS"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">提币审核级数</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONFIG_COIN_WITHDRAW_AUDIT_STEPS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"COIN_WITHDRAW_AUDIT_STEPS"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">C2C_ADMIN_USER_ID </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"C2C_ADMIN_USER_ID"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/*********************************** CONFIG TABLE CODE ********************************/</span><br /><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    /************************************* CACHE KEY ************************************/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    /**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">交易区域</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_TRADE_AREA </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"tradeArea:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">交易区域</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_TRADE_AREAS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"tradeAreas:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币种</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_COIN </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"coin:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">交易对列表</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_MARKETS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"markets:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">交易对列表</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_AREA_MARKETS </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"areaMarkets:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">交易对</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_MARKET </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"market:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">基础配置</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_CONFIG </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"config:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">系统配置列表</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_CONFIG_LIST </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"config_list:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">管理员</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_ADMIN_USER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"user_admin"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_C2C_ADMIN_USER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"user_c2c_admin"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CACHE_KEY_AGENT_ADMIN_USER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"user_agent_admin"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/************************************* CACHE KEY ************************************/</span><br /><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    /**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币币市场行情</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">Socket</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">推送</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CH_MARKETS_TICKER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"market.ticker"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">未成交委托订阅通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CH_ORDER_PENDING </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"order.pending.update"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">历史委托订阅通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CH_ORDER_FINISHED </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"order.finished.update"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">持仓汇总订阅通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CH_POSITION_SUMMARY_UPDATE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"position.summary.update"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">今日平仓订阅通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CH_CLOSEPOSITION_ORDERS_UPDATE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"closeposition.orders.update"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">今日委托订阅通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CH_ENTRUST_ORDERS_UPDATE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"entrust.orders.update"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">今日成交订阅通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CH_TURNOVER_ORDERS_UPDATE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"turnover.orders.update"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/************************************* REDIS KEY ************************************/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    /**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">验证码</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">redis</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">存储</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">Key</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_CAPTCHA_KEY </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CAPTCHA:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">短信验证码</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">redis</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">存储</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">Key</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_SMS_CODE_KEY </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"SMSCODE:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">登录设备存储</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">key</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_DEVICES_KEY </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"DEVICES"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">最大缓存数据量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">long </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_MAX_CACHE_KLINE_SIZE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:8pt">10000L</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币币交易</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">K</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">线 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">redis</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">存储</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">Key</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_TRADE_KLINE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"TRADE_KLINE:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币币交易撮合队列 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">redis</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">存储</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">Key</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_TRADE_MATCH </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"TRADE_MATCH:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币币交易对</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_TRADE_MARKET </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"TRADE_MARKET"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">法币充值审核锁</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_CASH_RECHARGE_AUDIT_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CASH_RECHARGE_AUDIT_LOCK:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">法币提现审核锁</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_CASH_WITHDRAW_AUDIT_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"CASH_WITHDRAW_AUDIT_LOCK:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">数字货币提现审核锁</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_COIN_WITHDRAW_AUDIT_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"COIN_WITHDRAW_AUDIT_LOCK:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币币交易撤单锁</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_TRADE_ORDER_CANCEL_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"TRADE_ORDER_CANCEL_LOCK:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">币币交易撮合锁</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_TRADE_ORDER_MATCH_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"TRADE_ORDER_MATCH_LOCK:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">创新交易资金账户锁</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">REDIS_KEY_TRADE_ACCOUNT_LOCK </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"TRADE_ACCOUNT_LOCK:"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/************************************* REDIS KEY ************************************/</span><br /><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    /************OAUTH*********************/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">AUTHORIZATION_HEADER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"Authorization"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">BEARER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"Bearer "</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/************OAUTH*********************/</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    /************STREAM*********************/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CHANNEL_SENDTO_USER </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"user"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CHANNEL_SENDTO_GROUP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"group"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CHANNEL_TICKER_UPDATE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"ticker"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">钱包币</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">COIN_TYPE_QBB </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"qbb"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">认购币</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">COIN_TYPE_RGB </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"rgb"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">}</span></p><p style="font-size:6.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:6.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">6</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">盘口深度事件触发机制的处理</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">6.1 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">远程调用市场数据</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">在 </span><span style="color:#0000ff; font-family:微软雅黑; font-size:10.5pt; font-weight:bold">MarketServiceFeign </span><span style="font-family:微软雅黑; font-size:10.5pt">里面添加: </span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt; text-indent:21pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">获取所有的市场</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#0000ff; font-family:Consolas; font-size:9pt; font-style:italic; font-weight:bold">    </span><span style="background-color:#ffffff; color:#0000ff; font-family:Consolas; font-size:9pt; font-weight:bold">@GetMapping(value = "/all")</span><br /><span style="background-color:#ffffff; color:#0000ff; font-family:Consolas; font-size:9pt; font-weight:bold">    List&lt;MarketDto&gt; tradeMarkets();</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">6.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">远程调用该市场里面的盘口深度数据</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">在 </span><span style="color:#0000ff; font-family:微软雅黑; font-size:10.5pt; font-weight:bold">MarketServiceFeign </span><span style="font-family:微软雅黑; font-size:10.5pt">里面添加: </span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">币币交易市场深度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">symbol    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易对标识符</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">mergeType </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">合并深度类型</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#0000ff; font-family:Consolas; font-size:10pt; font-weight:bold">@GetMapping("/depth/{symbol}/{mergeType}")</span><br /><span style="background-color:#ffffff; color:#0000ff; font-family:Consolas; font-size:10pt; font-weight:bold">String depth(@PathVariable("symbol") String symbol,@PathVariable("mergeType") String mergeType);</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">6.3 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">向下游订阅的队列里面推送该数据</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">订阅组</span><span style="font-family:Consolas; font-size:10.5pt">: </span><span style="color:#0000ff; font-family:Consolas; font-size:10.5pt; font-weight:bold">market.%s.depth.step%s</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">深度盘口数据事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">DepthEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">{</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">ObjectMapper </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">objectMapper</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MarketServiceFeign </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">marketServiceClient </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Source </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">source </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">推送市场合并深度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.tradeMarkets().forEach(market -&gt; {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">try </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">{</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">DepthMergeType mergeType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">DepthMergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt; font-style:italic">values</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String groupName </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"market.%s.depth.step%s"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">, market.getSymbol(), </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">mergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.getValue()).toLowerCase();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">JSONObject body </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String data </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.depth(market.getSymbol(), </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">mergeType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.getCode());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">body</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"tick"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">data</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">groupName</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.setBody(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">objectMapper</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.writeValueAsString(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">body</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.subscribeEventOutput().send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                                    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">                                            </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                                            .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                                            .build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                    );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">            } </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">catch </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">JsonProcessingException </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">e) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                e.printStackTrace();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        });</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">}</span></p><p style="font-size:6.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:6.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">7</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:Consolas; font-size:22pt; font-weight:bold">K</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">线事件的处理</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">7.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">数据流向图</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.003.png" width="554" height="296" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">7.2 K</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线的模型</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.004.png" width="554" height="279" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Data</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Line </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">时间</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">DateTime </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">time</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">开盘价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">open</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最高价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">high</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最低价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">low</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">收盘价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">close</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">总交易量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">volume</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">Line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {}</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">通过价格构造</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">time </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">时间</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">price </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">成交价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">volume </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">成交量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">Line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">DateTime </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">time, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">price, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">volume) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">time </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= time;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">open </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= price;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">high </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= price;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">low </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= price;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">close </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= price;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">volume </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= volume;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">通过</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线构造</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">line </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">k</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">Line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">line) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">格式化称</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">kline</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">toKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">时间，开，高，低，收，量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">JSONArray array </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">JSONArray();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">array</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.add(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">time</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getMillis());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">array</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.add(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">open</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">array</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.add(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">high</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">array</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.add(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">low</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">array</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.add(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">close</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">array</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.add(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">volume</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">array</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toJSONString();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">7.3 K</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线的推送</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线推送事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">KlineEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Runnable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">交易对标识符</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">channel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * redis key </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">前缀</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">keyPrefix</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private static </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">RedisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Object</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Source </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">KlineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">KlineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">symbol, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">channel, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">keyPrefix) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">symbol </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= symbol;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">channel </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= channel;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">keyPrefix </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= keyPrefix;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">事件触发处理机制</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">KlineType klineType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">KlineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">values</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String groupName </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">channel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.toLowerCase(), </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getValue()).toLowerCase();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String key </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">StringBuffer(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">keyPrefix</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">).append(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">).append(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">":"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">).append(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getValue()).toString();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Object</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klines </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.opsForList().range(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">key</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(!</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klines</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">groupName</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSONObject body </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">body</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"tick"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klines</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.get(</span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">body</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.toJSONString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.subscribeEventOutput().send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">                                </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                                .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                                .build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">run</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        handle();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">7.4 K </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线事件的触发</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线推送事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">KlineEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Runnable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易对标识符</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">通道</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">channel</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * redis key </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">前缀</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">keyPrefix</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">KLINE_GROUP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"market.%s.kline.%s" </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">; </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 1%s: </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易对</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">  2%s: k </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线类型</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">RedisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Object</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Source </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">source </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">KlineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">KlineEvent</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">symbol, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">channel, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">keyPrefix) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">symbol </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= symbol;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">channel </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= channel;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">keyPrefix </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= keyPrefix;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">事件触发处理机制</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 1 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">循环所有的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线类型</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">KlineType klineType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">KlineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">values</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 2 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">获取特定的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线类型</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> keyPrefix:etcgcn:1min</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String key </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">StringBuilder(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">keyPrefix</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">).append(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">).append(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">":"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">).append(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">klineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getValue().toLowerCase()).toString() ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Object</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">lines </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().range(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">key</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(!</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">lines</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)){</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Object lineData </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">lines</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.get(</span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">JSONObject jsonObject </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"tick"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">lineData</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// market.%s.kline.%s</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">KLINE_GROUP</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">klineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getValue().toLowerCase()));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">让线程池调度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">run</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        handle();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">7.5 K </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线的生成</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Component</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeKlineService </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CommandLineRunner </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">当我们的交易完成</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">(</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">撮合</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">)</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">之后</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">,</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">就会触发</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">k </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线的生成</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public static </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BlockingQueue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CreateKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">queue </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">LinkedBlockingDeque&lt;&gt;();</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">StringRedisTemplate </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">run</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">... args) </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">throws </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Exception </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">while </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">true</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CreateKLineDto createKLineDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">queue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.poll(); </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">从里面获取一个数据</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">,</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">若没有数据</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">,</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">则会阻塞</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">createKLineDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">!= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">null</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">KlineType klineType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">KlineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">values</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.generateKLine(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">createKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">klineType</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">为当前的交易数据生成</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">klineData</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">klineType</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">generateKLine</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CreateKLineDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">klineData, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">KlineType </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">klineType) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 1 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">获取之前该</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线的数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String redisKey </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">StringBuilder(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Constants</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">REDIS_KEY_TRADE_KLINE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                .append(klineData.getSymbol().toLowerCase())</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                .append(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">":"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                .append(klineType.getValue().toLowerCase()).toString();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Long size </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().size(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">DateTime dateTime </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">KlineTimeUtil</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">getKLineTime</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(klineType);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 2 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">之前没有该</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线的数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">size </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">== </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Line line </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">Line(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">dateTime</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, klineData.getPrice(), klineData.getVolume());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">放在</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">Redis </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">里面</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().leftPush(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toKline());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 3 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">之前有数据</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> ,</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">获取最近的一个数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String historyKlineData </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().range(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">).get(</span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Line historyKline </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">Line(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKlineData</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 4 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">若当前的时间</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">: </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">是否还在上一个时间的区间内</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">dateTime</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.compareTo(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getTime()) == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// redis</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">的容量是否超</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">size </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Constants</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">REDIS_MAX_CACHE_KLINE_SIZE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().rightPop(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Line line </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">Line();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setTime(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">dateTime</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">如果我们当前的交易量为</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> 0</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(klineData.getVolume().compareTo(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ZERO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setHigh(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getClose());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setLow(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getClose());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setOpen(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getClose());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setClose(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getClose());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setVolume(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ZERO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">放在</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">Redis </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">里面</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">                </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().leftPush(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toKline());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setOpen(klineData.getPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setClose(klineData.getPrice());</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最高价</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> ,</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最低价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(klineData.getPrice().compareTo(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getHigh()) == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setHigh(klineData.getPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setLow(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getClose());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(klineData.getPrice().compareTo(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getLow()) == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setLow(klineData.getPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setHigh(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getClose());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setClose(klineData.getPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().set(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toKline());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">放最新的进入</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">放在</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">Redis </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">里面</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().leftPush(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">line</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toKline());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(klineData.getVolume().compareTo(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ZERO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setClose(klineData.getPrice());</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(klineData.getPrice().compareTo(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getHigh()) == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setHigh(klineData.getPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(klineData.getPrice().compareTo(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getLow()) == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setLow(klineData.getPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setVolume(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getVolume().add(klineData.getVolume()));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.opsForList().set(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">historyKline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toKline());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p></td></tr></table><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">7.6 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">监听撮合的数据</span></h2><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">7.6.1 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">添加</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">Sink</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:11pt; line-height:115%; margin:0pt 0pt 10pt"><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:11pt">public interface </span><span style="background-color:#ffffff; font-family:Consolas; font-size:11pt">Sink </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:11pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:11pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:11pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:11pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:11pt; font-style:italic">交易记录的输入</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:11pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:11pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:11pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:11pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:11pt">@Input</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:11pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:11pt">"exchange_trades_in"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:11pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:11pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:11pt">MessageChannel </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:11pt">exchangeTradesIn</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:11pt">() ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:11pt">}</span></p><p style="font-size:10pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:10pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">7.6.2 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">添加配置信息</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.005.png" width="554" height="199" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">7.6.3 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">监听器</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">ExchangeTradesListener </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">{</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@StreamListener</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"exchange_trades_in"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">handlerExchangeTrades</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">ExchangeTrade</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">&gt; exchangeTrades) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">log</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.info(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"</span><span style="background-color:#ffffff; color:#067d17; font-family:宋体; font-size:8pt">接收到撮合引擎的数据</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">===&gt;{}"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">, exchangeTrades);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(!</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(exchangeTrades)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">ExchangeTrade exchangeTrade </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">: exchangeTrades) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">CreateKLineDto createKLineDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= exchangeTrade2CreateKLineDto(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">exchangeTrade</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">TradeKlineService</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:8pt; font-style:italic">queue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.offer(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">createKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">CreateKLineDto </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">exchangeTrade2CreateKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">ExchangeTrade </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">exchangeTrade) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">CreateKLineDto createKLineDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">CreateKLineDto();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">createKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.setPrice(exchangeTrade.getPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">createKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.setSymbol(exchangeTrade.getSymbol());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">createKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.setVolume(exchangeTrade.getAmount());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">createKLineDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">}</span></p><p style="font-size:6.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:6.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">记得把撮合引擎的对象复制过来</span><span style="font-family:Consolas; font-size:10.5pt">:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.006.png" width="301" height="244" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">8</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">市场行情事件的处理</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">8.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">远程调用交易区域</span></h2><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">8.1.1 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">创建</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">TradeAreaDto</span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">对象</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Data</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeAreaDto </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">java.io.Serializable </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">主键</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Long </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">id</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">交易区名称</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">name</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">交易区代码</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">code</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">类型：</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">1-</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">数字货币交易；</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">2-</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">创新交易使用；</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Integer </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">type</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">结算币种（仅创新交易需要使用）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Long </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">coinId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">结算币种名称（仅创新交易需要使用）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">coinName</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">排序</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private int </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">sort</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">状态</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Integer </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">status</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">创建时间</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Date </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">createTime</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">修改时间</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Date </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">lastUpdateTime</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">交易区内所在市场</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">Id(</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">逗号分隔</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">)</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketIds</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">8.1.2 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">创建</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">TradingAreaServiceClient</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@FeignClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(name = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"exchange-service"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,contextId = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"tradingAreaServiceClient" </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,configuration = </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">OAuth2FeignConfig</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">class </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,path = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"/tradeArea" </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public interface </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradingAreaServiceClient </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">查询所有的交易区域</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"/list"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">tradingAreaList</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">8.1.3 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">创建</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">TradeMarketDto</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Data</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeMarketDto </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Comparable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeMarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; {</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易对</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">symbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">市场名称</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">name</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">图片</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">image</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">买入手续费</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">buyFeeRate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">卖出手续费</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">sellFeeRate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">价格小数位数</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private int </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">priceScale</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">数量小数位数</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private int </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">numScale</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最小委托数量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">numMin</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最大小数位数</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">numMax</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最小成交额</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">tradeMin</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最大成交额</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">tradeMax</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">当前价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">price</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">价格单位</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">priceUnit</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">当前价（人民币）</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">cnyPrice</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">报价货币人民币价格</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">coinCnyPrice</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">合并深度</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MergeDepthDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">mergeDepth</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最高价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">high</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">最低价</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">low</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">日总交易量</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">volume </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ZERO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">日总成交额</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">amount </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ZERO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">涨幅</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private double </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">change</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">排序</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private int </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">sort</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public int </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">compareTo</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeMarketDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">object) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">this</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">sort </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;= object.getSort()) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        } </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">else </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">-</span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">8.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">处理该事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">行情市场的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Source </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradingAreaServiceClient </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">tradingAreaServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketServiceFeign </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">MARKET_GROUP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"market.%s.ticker"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">; </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// %s</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">代表交易区域</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">MARKET_DETAIL_GROUP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"markets.%s.detail" </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">; </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易区域的详情交易数据</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 1 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易区域的查询</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeAreaDtoList </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">tradingAreaServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.tradeAreas();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeAreaDtoList</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeAreaDto tradeAreaDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeAreaDtoList</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 2 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">差该交易区域下的交易数据</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> , </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">使用的是交易区域里面市场的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">id("id1,id2")</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeMarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeMarketDtos </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.queryMarkesByIds(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getMarketIds());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeMarketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">JSONObject jsonObject </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"markets"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeMarketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">MARKET_GROUP</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getCode().toLowerCase()));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toJSONString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.subscribeGroupOutput()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                    .send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">                                    </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                                    .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">).build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                    );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">获取所有的交易市场</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDtos </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.tradeMarkets();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)){</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto marketDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeMarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeMarketDtos </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.queryMarkesByIds(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getId().toString());</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">JSONObject jsonObject </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"tick"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">tradeMarketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) ;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">MARKET_DETAIL_GROUP</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getSymbol()));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toJSONString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.subscribeGroupOutput()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                    .send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">                                    </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                                    .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">).build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                    );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p></td></tr></table><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">9</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">成交记录事件的处理</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">9.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">远程调用数据</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">在</span><span style="color:#0000ff; font-family:Consolas; font-size:10.5pt; font-weight:bold">MarketServiceFeign</span><span style="font-family:微软雅黑; font-size:10.5pt">里面添加</span><span style="font-family:Consolas; font-size:10.5pt">:</span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">获取最新成交列表</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10pt; font-style:italic">symbol </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">交易对标识符</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"/trades/{symbol}"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">trades</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@PathVariable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"symbol"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">symbol);</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">9.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">处理该事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">成交记录事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MarketServiceFeign </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Source </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">try </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.tradeMarkets().forEach(market -&gt; {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String groupName </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"market.%s.trade.detail"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, market.getSymbol()).toLowerCase();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String data </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.trades(market.getSymbol());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSONObject orders </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">orders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"data"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">data</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">groupName</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">orders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.toJSONString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.subscribeEventOutput().send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">                                </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                                .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                                .build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            });</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        } </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">catch </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Exception </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">e) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">log</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.error(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"</span><span style="background-color:#ffffff; color:#067d17; font-family:宋体; font-size:9pt">推送最新成交订单异常</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            e.printStackTrace();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">10</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">行情数据事件</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">10.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">处理该事件</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">行情数据的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">K</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeKLineEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketServiceFeign </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">markets </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.tradeMarkets();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(!</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">markets</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto market </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">markets</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CreateKLineDto createKLineDTO </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">CreateKLineDto();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">createKLineDTO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setSymbol(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">market</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getSymbol())  ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">createKLineDTO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setPrice(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">market</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getOpenPrice());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">createKLineDTO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setVolume(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">BigDecimal</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">ZERO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeKLineService</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">queue</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.offer(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">createKLineDTO</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">11</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">定时任务完善</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">11.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">刷新</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">24</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">小时的成交记录</span></h2><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">11.1.1 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">远程调用</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">在</span><span style="color:#0000ff; font-family:Consolas; font-size:10.5pt; font-weight:bold">MarketServiceFeign</span><span style="font-family:微软雅黑; font-size:10.5pt">里面添加</span><span style="font-family:Consolas; font-size:10.5pt">:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic">刷新</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic">24</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic">小时成交数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic"> * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:10.5pt; font-style:italic">symbol </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic">交易对</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10.5pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10.5pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10.5pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">(value = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10.5pt">"/refresh_24hour"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10.5pt">void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10.5pt">refresh24hour</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10.5pt">@RequestParam</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10.5pt">"symbol"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10.5pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10.5pt">symbol);</span></p><p style="font-size:9pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:9pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">11.1.2 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">添加任务</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">在</span><span style="font-family:Consolas; font-size:10.5pt">: MarketTickerTask </span><span style="font-family:微软雅黑; font-size:10.5pt">里面添加</span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">刷新</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">24</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">小时成交数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Scheduled</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(fixedRate = </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1000</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">refresh24HDeal</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.tradeMarkets().forEach(market -&gt; {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(market.getStatus() == </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.refresh24hour(market.getSymbol());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    });</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">11.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">关于前端订阅的</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">channel</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">前端订阅数据时</span><span style="font-family:Consolas; font-size:10.5pt">:</span><span style="font-family:微软雅黑; font-size:10.5pt">它的所有的交易对都是小写</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">因次</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">我们在使用</span><span style="font-family:Consolas; font-size:10.5pt">source</span><span style="font-family:微软雅黑; font-size:10.5pt">发送数据之前</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">需要将所有的</span><span style="font-family:Consolas; font-size:10.5pt">symbol</span><span style="font-family:微软雅黑; font-size:10.5pt">都转化为小写</span><span style="font-family:Consolas; font-size:10.5pt">.</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.007.png" width="554" height="30" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">12</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">定时任务的启动</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">12.1 MarketServiceFeign </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">的处理</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:8pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@FeignClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(name = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"exchange-service"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">, contextId = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"marketServiceFeign"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">, configuration = </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">OAuth2FeignConfig</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">.</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">class</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">, path = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/markets"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">public interface </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MarketServiceFeign </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">使用报价货币 以及 出售的货币的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">iD</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     *</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">buyCoinId</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/getMarket"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MarketDto </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">findByCoinId</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@RequestParam</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"buyCoinId"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Long </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">buyCoinId, </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@RequestParam</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"sellCoinId"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">Long </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">sellCoinId);</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/getMarket/symbol"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MarketDto </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">findBySymbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@RequestParam</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"symbol"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">symbol);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">查询所有的交易市场</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/tradeMarkets"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">tradeMarkets</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">();</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">查询该交易对下的盘口数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">symbol</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">value</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/tradeMarkets/{symbol}/{type}"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">depthData</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@PathVariable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"symbol"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">symbol, </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@PathVariable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"type"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">) </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">int </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">value);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">使用市场的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">ids </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">查询该市场的交易趋势</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">marketIds</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/queryMarketsByIds"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">TradeMarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">queryMarkesByIds</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@RequestParam</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"marketIds"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">marketIds);</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">通过交易对查询所有的交易数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">symbol</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/trades"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">trades</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">symbol);</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">刷新</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">24</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">小时成交数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:8pt; font-style:italic">symbol </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">交易对</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:8pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:8pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(value = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"/refresh_24hour"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:8pt">void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:8pt">refresh24hour</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:8pt">@RequestParam</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:8pt">"symbol"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:8pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">symbol);</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:8pt">}</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">12.2 TradingAreaServiceClient</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">的处理</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@FeignClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(name = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"exchange-service"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,contextId = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"tradingAreaServiceClient" </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,configuration = </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">OAuth2FeignConfig</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">class</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">,path = </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"/tradeArea" </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public interface </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradingAreaServiceClient </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">查询所有的交易区域</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">     </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">     */</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"/all"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">tradeAreas</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">12.3 Token </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">传递问题</span></h2><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">12.3.1 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">修改</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">AuthorizationServerConfig</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.008.png" width="554" height="229" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">12.3.2 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">获取</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">Token </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">并放在</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">Constants </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">里面</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.009.png" width="554" height="93" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.010.png" width="553" height="172" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">获取到</span><span style="font-family:Consolas; font-size:10.5pt">Token:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.011.png" width="554" height="105" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">放在常量里面</span><span style="font-family:Consolas; font-size:10.5pt">:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.012.png" width="554" height="247" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">12.3.3 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">传递获取到的内置的</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">Token</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.013.png" width="554" height="330" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.014.png" width="554" height="334" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">13</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">盘口数据的推送测试</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">13.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">实现</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">MarketServiceFeign </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">里面的方法</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.015.png" width="529" height="107" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">13.1.1 MarketController</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">查询所有的交易市场</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">tradeMarkets</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketService</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.queryAllMarkets() ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">查询该交易对下的盘口数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:9pt; font-style:italic">symbol</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:9pt; font-style:italic">value</span><br /><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">depthData</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">symbol, </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">int </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">value) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">R</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthsVo</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">deptVosSymbol </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= findDeptVosSymbol(symbol, value + </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">""</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">DepthsVo data </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">deptVosSymbol</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getData();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">toJSONString</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">data</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">13.1.2 MarketService</span></h3><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">查询所有的市场数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">queryAllMarkets</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">();</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">13.1.3 MarketServiceImpl</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">查询所有的市场数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">queryAllMarkets</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Market</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">list </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= list(</span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">LambdaQueryWrapper&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Market</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt;().eq(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Market</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">::getStatus, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:10pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDtoMappers</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">INSTANCE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toConvertDto(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">list</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">13.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">测试盘口数据的推送</span></h2><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">13.2.1</span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">因为计算机性能较差</span><span style="font-family:Consolas; font-size:16pt; font-weight:bold">,</span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">我们需要先将部分数据修改</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">:</span><span style="font-family:微软雅黑; font-size:10.5pt">将交易市场设置为 关闭</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">只剩第三个启用</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.016.png" width="553" height="143" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">修改</span><span style="font-family:Consolas; font-size:10.5pt">exchange-chan</span><span style="font-family:微软雅黑; font-size:10.5pt">的配置文件</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">修改为单机推送</span><span style="font-family:Consolas; font-size:10.5pt">:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.017.png" width="476" height="232" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">13.2.2 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">关闭多余的定时任务</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.018.png" width="479" height="362" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.019.png" width="554" height="112" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h3 style="margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:16pt; font-weight:bold">13.2.3 </span><span style="font-family:微软雅黑; font-size:16pt; font-weight:bold">测试推送</span></h3><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">新增数据后</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">观察数据的变化就可以了</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.020.png" width="501" height="668" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">14</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:Consolas; font-size:22pt; font-weight:bold">KLine</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">的推送</span></h1><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">14.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">完成</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">MarketController </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">里面的</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">K</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线查询方法</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线的查询</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:9pt; font-style:italic">symbol </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">交易对</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">* @param </span><span style="background-color:#ffffff; color:#3d3d3d; font-family:Consolas; font-size:9pt; font-style:italic">type   </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线类型</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">* @return</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> */</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@GetMapping</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"/kline/{symbol}/{type}"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">R</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSONArray</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt;&gt; </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">queryKLine</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@PathVariable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"symbol"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">symbol, </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@PathVariable</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"type"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">) </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">type) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">我们的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线放在</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">Redis </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">里面</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String redisKey </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">StringBuilder(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Constants</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">REDIS_KEY_TRADE_KLINE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">).append(symbol.toLowerCase()).append(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">":"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">).append(type).toString();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klines </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">redisTemplate</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.opsForList().range(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">redisKey</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">0</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Constants</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">REDIS_MAX_CACHE_KLINE_SIZE </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">- </span><span style="background-color:#ffffff; color:#1750eb; font-family:Consolas; font-size:9pt">1</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSONArray</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">result </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">=  </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">ArrayList&lt;&gt;(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klines</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.size()) ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(!</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klines</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String kline </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">klines</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSONArray objects </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">parseArray</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">kline</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">result</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.add(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">objects</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">) ;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">R</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">ok</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">result</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return null</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p></td></tr></table><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">14.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">放行该请求</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">ResourceServerConfig </span><span style="font-family:微软雅黑; font-size:10.5pt">里面</span><span style="font-family:Consolas; font-size:10.5pt">:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.021.png" width="554" height="121" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">网关里面</span><span style="font-family:Consolas; font-size:10.5pt">:JwtCheckFilter:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.022.png" width="472" height="247" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">14.3 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">关闭其他的定时任务</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">,</span><span style="font-family:黑体; font-size:16pt; font-weight:bold">只推</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">K </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.023.png" width="492" height="202" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.024.png" width="554" height="269" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">14.4 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">打开 </span><span style="font-family:Arial; font-size:16pt; font-weight:bold">K </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线推送</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.025.png" width="301" height="230" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.026.png" width="459" height="252" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.027.png" width="554" height="139" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.028.png" width="553" height="386" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.029.png" width="554" height="152" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.030.png" width="469" height="107" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">14.5 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">清除</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">Redis </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">里面的所有</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">K </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.031.png" width="360" height="224" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">14.6 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">撮合交易测试</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">在买入和售出选择合适的价格</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">即可进行撮合</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">撮合成功后</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">数据会推送过来</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.032.png" width="441" height="576" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.033.png" width="554" height="253" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">14.7 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">延迟太高的同学</span></h2><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">因为运行了</span><span style="font-family:Consolas; font-size:10.5pt">9</span><span style="font-family:微软雅黑; font-size:10.5pt">个微服务</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">导致线程的调度非常慢</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">因此</span><span style="font-family:Consolas; font-size:10.5pt">,K </span><span style="font-family:微软雅黑; font-size:10.5pt">线的推送速度会很慢</span><span style="font-family:Consolas; font-size:10.5pt">.</span><span style="font-family:微软雅黑; font-size:10.5pt">大家一定要关闭电脑上无用的软件</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">以及关闭多余的服务</span><span style="font-family:Consolas; font-size:10.5pt">.</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:微软雅黑; font-size:10.5pt">最后</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">如果实在推送不过来</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">或者是电脑死机了</span><span style="font-family:Consolas; font-size:10.5pt">,</span><span style="font-family:微软雅黑; font-size:10.5pt">可以在这个地方只推一种</span><span style="font-family:Consolas; font-size:10.5pt">K </span><span style="font-family:微软雅黑; font-size:10.5pt">线类型</span><span style="font-family:Consolas; font-size:10.5pt">:</span></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.034.png" width="554" height="357" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h1 style="font-size:22pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; text-indent:0pt; widows:0"><span style="font-family:Consolas; font-size:22pt; font-weight:bold">15</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">、</span><span style="font-family:微软雅黑; font-size:22pt; font-weight:bold">关于其他的推送服务</span></h1><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.035.png" width="554" height="455" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><img src="4e4f87a4-e2ea-4fd4-860e-787946c4d011.036.png" width="553" height="41" alt="" style="-aw-left-pos:0pt; -aw-rel-hpos:column; -aw-rel-vpos:paragraph; -aw-top-pos:0pt; -aw-wrap-type:inline" /></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">15.1 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">市场行情</span><span style="font-family:Arial; font-size:16pt; font-weight:bold">K </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">线的推送</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:9pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">行情市场的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">K </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">线</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MarketEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">Source </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradingAreaServiceClient </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">tradingAreaServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MarketServiceFeign </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">MARKET_GROUP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"market.%s.ticker"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">; </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">// %s</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">代表交易区域</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">private static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">MARKET_DETAIL_GROUP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"markets.%s.detail" </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">; </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">交易区域的详情交易数据</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:9pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:9pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">// 1 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">交易区域的查询</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeAreaDtoList </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">tradingAreaServiceClient</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.tradeAreas();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeAreaDtoList</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeAreaDto tradeAreaDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeAreaDtoList</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">// 2 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">差该交易区域下的交易数据</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic"> , </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">使用的是交易区域里面市场的</span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">id("id1,id2")</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeMarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeMarketDtos </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.queryMarkesByIds(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getMarketIds());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeMarketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSONObject jsonObject </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"markets"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeMarketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">MARKET_GROUP</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeAreaDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getCode().toLowerCase()));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.toJSONString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.subscribeGroupOutput()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                    .send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">                                    </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                                    .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">).build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                    );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:9pt; font-style:italic">// </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">获取所有的交易市场</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:9pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">marketDtos </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.tradeMarkets();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">if</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">marketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)){</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MarketDto marketDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">marketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">TradeMarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeMarketDtos </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.queryMarkesByIds(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">marketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getId().toString());</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">JSONObject jsonObject </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:9pt">"tick"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">tradeMarketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">) ;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:9pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">MARKET_DETAIL_GROUP</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">,</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">marketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.getSymbol().toLowerCase()));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.toJSONString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.subscribeGroupOutput()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                    .send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">                                    </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                                    .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:9pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:9pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">).build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">                    );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:9pt">}</span></p><p style="font-size:7.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:7.5pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p><h2 style="font-size:16pt; line-height:130%; margin:13pt 0pt; orphans:0; page-break-after:avoid; page-break-inside:avoid; text-align:justify; widows:0"><span style="font-family:Arial; font-size:16pt; font-weight:bold">15.2 </span><span style="font-family:黑体; font-size:16pt; font-weight:bold">成交记录的推送</span></h2><table cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-left:0pt"><tr><td style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:415.3pt"><p style="background-color:#ffffff; font-size:10pt; line-height:115%; margin:0pt 0pt 10pt"><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">/**</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic"> * </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">成交记录事件</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic"> </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">*/</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Component</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Slf4j</span><br /><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public class </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">TradeEvent </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">implements </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Event </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">{</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">Source </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private static final </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">TRADE_GROUP </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"market.%s.trade.detail"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">; </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// %s </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">代表交易对</span><br /><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Autowired</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">private </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketServiceFeign </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">@Override</span><br /><span style="background-color:#ffffff; color:#9e880d; font-family:Consolas; font-size:10pt">    </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">public void </span><span style="background-color:#ffffff; color:#00627a; font-family:Consolas; font-size:10pt">handle</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">() {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 1 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">获取所有的交易市场</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">        </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">List</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&lt;</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">&gt; </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDtos </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.tradeMarkets();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">if </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">CollectionUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">isEmpty</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">return</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">;</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">for </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MarketDto marketDto </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">: </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDtos</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">) {</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:Consolas; font-size:10pt; font-style:italic">// 2 </span><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">查询该交易对下的交易数据</span><br /><span style="background-color:#ffffff; color:#8c8c8c; font-family:宋体; font-size:10pt; font-style:italic">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String data </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">marketServiceFeign</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.trades(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getSymbol());</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">JSONObject jsonObject </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">JSONObject();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.put(</span><span style="background-color:#ffffff; color:#067d17; font-family:Consolas; font-size:10pt">"data"</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">data</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">);</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessagePayload messagePayload </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">= </span><span style="background-color:#ffffff; color:#0033b3; font-family:Consolas; font-size:10pt">new </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">MessagePayload();</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setChannel(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">String</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">format</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">TRADE_GROUP</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">marketDto</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.getSymbol().toLowerCase()));</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.setBody(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">jsonObject</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.toString());</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">            </span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt">source</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.subscribeGroupOutput()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                    .send(</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                            </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessageBuilder</span><br /><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">                                    </span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt; font-style:italic">withPayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">messagePayload</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">)</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                                    .setHeader(</span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MessageHeaders</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">CONTENT_TYPE</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">, </span><span style="background-color:#ffffff; font-family:Consolas; font-size:10pt">MimeTypeUtils</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">.</span><span style="background-color:#ffffff; color:#871094; font-family:Consolas; font-size:10pt; font-style:italic">APPLICATION_JSON</span><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">).build()</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">                    );</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">        }</span><br /><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">    }</span><br /><span style="background-color:#ffffff; color:#080808; font-family:Consolas; font-size:10pt">}</span></p><p style="font-size:8pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:8pt; vertical-align:baseline">&#xa0;</span></p></td></tr></table><p style="font-size:10.5pt; line-height:115%; margin:0pt 0pt 10pt; orphans:0; text-align:justify; widows:0"><span style="font-family:Consolas; font-size:10.5pt">&#xa0;</span></p></div><div class="cnzz" style="display: none;">
	        <script src="https://s23.cnzz.com/z_stat.php?id=1277655852&web_id=1277655852" language="JavaScript"></script>
            </div>
            <div class="docpe" style="position: absolute;color: white;margin-left:-450;">
            <a target="_blank" href="http://www.docpe.com">档铺网——在线文档免费处理</a>
            </div>
            </body></html>